<template>
  <div class="custom-promise">
    <a-typography-text code>
      {{ code }}
    </a-typography-text>
  </div>
</template>
<script lang="ts" setup>
import CustomPromise from './class'
import { ref } from 'vue'

const code = ref('')

const fn = new CustomPromise((res, rej) => {
  setTimeout(() => {
    res('CustomPromise success')
  }, 500)
})
fn.then((data) => {
  console.log('fn then', data)
})

</script>
<style lang="scss" scoped>
.custom-promise {
}
</style>
